package com.example.springboot2.oa.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.springboot2.base.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_user")
public class TUser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * uuid
     */
    @TableField("id")
    private String id;

    /**
     * 角色ID
     */
    @TableField("role_id")
    private String roleId;

    /**
     * 用户名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date createTime;

    /**
     * 邮箱
     */
    @TableField("user_email")
    private String userEmail;

    /**
     * 电话
     */
    @TableField("user_phone")
    private String userPhone;

    /**
     * 用户状态
     */
    @TableField("user_state")
    private int userState;

    /**
     * 用户密码
     */
    @TableField("user_pwd")
    private String userPwd;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * token
     */
    @TableField("token")
    private String token;
}